<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="key.Database" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Database db = new Database();
String notice = db.getNotice();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <%if(notice != null && ! notice.equals("")) { %>
  <script type="text/javascript">
  alert("<%= notice %>");
  </script>
  <%} %>
    
    <title>中转页面</title>
	<script type="text/javascript">
	window.location.href = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ? "php.jsp" :  "pcp.jsp";
	</script>
  </head>
  
  <body>
  
    <h1>正在判断浏览器</h1>
	<p>如果一直停留在此页面，非常不幸，你可能遇到了意外，点击以下链接手动转跳吧</p>
	<p><a href="pcp.jsp">电脑端页面</a></p>
	<p><a href="php.jsp">手机端页面</a></p>
  </body>
</html>
